Optimal. Leaf size=73 \[ 6 a^4 x+\frac {a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {7 a^4 \sin (c+d x)}{d}+\frac {2 a^4 \cos (c+d x) \sin (c+d x)}{d}-\frac {a^4 \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {2836, 2717,
2715, 8, 2713, 3855} \begin {gather*} -\frac {a^4 \sin ^3(c+d x)}{3 d}+\frac {7 a^4 \sin (c+d x)}{d}+\frac {a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {2 a^4 \sin (c+d x) \cos (c+d x)}{d}+6 a^4 x \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2717
Rule 2836
Rule 3855
Rubi steps
\begin {align*} \int (a+a \cos (c+d x))^4 \sec (c+d x) \, dx &=\int \left (4 a^4+6 a^4 \cos (c+d x)+4 a^4 \cos ^2(c+d x)+a^4 \cos ^3(c+d x)+a^4 \sec (c+d x)\right ) \, dx\\ &=4 a^4 x+a^4 \int \cos ^3(c+d x) \, dx+a^4 \int \sec (c+d x) \, dx+\left (4 a^4\right ) \int \cos ^2(c+d x) \, dx+\left (6 a^4\right ) \int \cos (c+d x) \, dx\\ &=4 a^4 x+\frac {a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {6 a^4 \sin (c+d x)}{d}+\frac {2 a^4 \cos (c+d x) \sin (c+d x)}{d}+\left (2 a^4\right ) \int 1 \, dx-\frac {a^4 \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=6 a^4 x+\frac {a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {7 a^4 \sin (c+d x)}{d}+\frac {2 a^4 \cos (c+d x) \sin (c+d x)}{d}-\frac {a^4 \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 91, normalized size = 1.25 \begin {gather*} \frac {a^4 \left (72 d x-12 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+81 \sin (c+d x)+12 \sin (2 (c+d x))+\sin (3 (c+d x))\right )}{12 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 93, normalized size = 1.27
method | result | size |
derivativedivides | \(\frac {\frac {a^{4} \left (\cos ^{2}\left (d x +c \right )+2\right ) \sin \left (d x +c \right )}{3}+4 a^{4} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+6 a^{4} \sin \left (d x +c \right )+4 a^{4} \left (d x +c \right )+a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(93\) |
default | \(\frac {\frac {a^{4} \left (\cos ^{2}\left (d x +c \right )+2\right ) \sin \left (d x +c \right )}{3}+4 a^{4} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+6 a^{4} \sin \left (d x +c \right )+4 a^{4} \left (d x +c \right )+a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(93\) |
risch | \(6 a^{4} x -\frac {27 i a^{4} {\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {27 i a^{4} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {a^{4} \sin \left (3 d x +3 c \right )}{12 d}+\frac {a^{4} \sin \left (2 d x +2 c \right )}{d}\) | \(118\) |
norman | \(\frac {6 a^{4} x +\frac {18 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {130 a^{4} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {106 a^{4} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {10 a^{4} \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+24 a^{4} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+36 a^{4} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+24 a^{4} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 a^{4} x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {a^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {a^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(206\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 89, normalized size = 1.22 \begin {gather*} -\frac {{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{4} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{4} - 12 \, {\left (d x + c\right )} a^{4} - 3 \, a^{4} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) - 18 \, a^{4} \sin \left (d x + c\right )}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.43, size = 80, normalized size = 1.10 \begin {gather*} \frac {36 \, a^{4} d x + 3 \, a^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, a^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (a^{4} \cos \left (d x + c\right )^{2} + 6 \, a^{4} \cos \left (d x + c\right ) + 20 \, a^{4}\right )} \sin \left (d x + c\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{4} \left (\int 4 \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 6 \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 4 \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cos ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \sec {\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.49, size = 116, normalized size = 1.59 \begin {gather*} \frac {18 \, {\left (d x + c\right )} a^{4} + 3 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (15 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 38 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 27 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.41, size = 93, normalized size = 1.27 \begin {gather*} 6\,a^4\,x+\frac {20\,a^4\,\sin \left (c+d\,x\right )}{3\,d}+\frac {2\,a^4\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {a^4\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d}+\frac {2\,a^4\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________